home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet multimedia / Animacje, filmy i prezentacje / Odtwarzacze filmow / ViPlay 2.09 / ViPlay209.exe / Graph / avi.vmg next >
Encoding:
Text File  |  2003-04-30  |  2.9 KB  |  57 lines

  1. ;
  2. ; This is a sample AVI Decoding Media Graph, it builds a decoding graph that looks like this:
  3. ;
  4. ;                             +-> [Indirectly Connect to the] -> Video Renderer
  5. ; File Source -> AVI Spliter -|
  6. ;                             +-> [Indirectly Connect to the] -> Audio Renderer
  7. ;
  8. ; Functions:
  9. ;
  10. ; AddFilter(FilterID,FilterName)
  11. ;   - You can get the FilterID string by loading the filter in graph edit
  12. ;     and saving the result to an XML file (File -> Save as XML).  Make sure
  13. ;     you copy it complete, along with the {} chars.
  14. ;     The FilterName is a name you assign to the filter.  I recommend using
  15. ;     the name as it's listed by GraphEdit.
  16. ;
  17. ; SetFilterFileName(FilterName,FileName)
  18. ;   - Use this function to set the file name the graph should load.  The FileName
  19. ;     should 99% of the time be set to "<FileName>" as this is the file selected by
  20. ;     the user (see example below).
  21. ;
  22. ; ConnectPin(SourceFilterName,SourcePinName,DestinationFilterName,DestinationPinName)
  23. ;   - The Source and Destination filter names are the names you used with the AddFilter
  24. ;     function.  The Pin names can be found by viewing an XML exported filter graph
  25. ;     using GraphEdit (note: the pin names as they appear within GraphEdit itself
  26. ;     are incorrect!).
  27. ;
  28. ; IndirectConnectPin(SourceFilterName,SourcePinName,DestinationFilterName,DestinationPinName)
  29. ;   - This function is similar to the ConnectPin function except that it allows you to
  30. ;     connect pins with missing filters in between them.  For example, you don't really know
  31. ;     which Audio/Video Codec an AVI file uses, so ... By Indirectly connecting the AVI Splitter
  32. ;     "Video->Out" pin with the Video Renderer filter "Video->In", the video codec is derived
  33. ;     automatically.
  34. ;
  35.  
  36. ; Filters that are consistantly used in an AVI Media Graph
  37. AddFilter({E436EBB5-524F-11CE-9F53-0020AF0BA770},Source File)
  38. AddFilter({79376820-07D0-11CF-A24D-0020AFD79767},Default DirectSound Device)
  39. AddFilter({70E102B0-5556-11CE-97C0-00AA0055595A},Video Renderer)
  40. AddFilter({1B544C20-FD0B-11CE-8C63-00AA0044B51E},AVI Splitter)
  41.  
  42. ; Assign the File Name into the File Source Filter
  43. SetFilterFileName(Source File,<FileName>)
  44.  
  45. ; Connect the file source filter (automatically loaded) to the AVI splitter
  46. ConnectPin(Source File,Output,AVI Splitter,input pin)
  47.  
  48. ; Connect the Video Stream Indirectly to the Video Renderer filter, thus automatically
  49. ; adding the Video Decoder codec into the Graph without actually knowing which codec it
  50. ; is (letting DirectShow detect and add the codec automatically).
  51. IndirectConnectPin(AVI Splitter,Stream 00,Video Renderer,In)
  52.  
  53. ; Connect the Audio Stream Indirectly to the Audio Renderer filter, thus automatically
  54. ; adding the Audio Decoder codec into the Graph without actually knowing which codec it
  55. ; is (letting DirectShow detect and add the codec automatically).
  56. IndirectConnectPin(AVI Splitter,Stream 01,Default DirectSound Device,Audio Input pin (rendered))
  57.